import { Controller, Get, Param, Delete } from '@nestjs/common';
import { Seat_Service } from './seat.service';
import { ApiTags } from '@nestjs/swagger';
import { util_ApiResponse_Base } from '@/common/util/apiResponse';
import { util_Index_ReturnContent } from '@/common/util/index';

@Controller('/adm/seat')
@ApiTags('seat 座位')
export class SeatController {
  constructor(private readonly seat_Service: Seat_Service) {}

  @Get('/detail/:id')
  @util_ApiResponse_Base({
    dataType: 'dataType_ell',
    //apiKey: '/adm/seat/detail/:id Get',
  })
  async seat_FindByGoodId(@Param('id') id: string) {
    return util_Index_ReturnContent(await this.seat_Service.seat_FindByGoodId(+id));
  }

  @Delete('/delete/:id')
  @util_ApiResponse_Base({
    dataType: 'dataType_delete',
    //apiKey: '/adm/seat/delete/:id Delete',
  })
  async seat_Remove(@Param('id') id: string) {
    return util_Index_ReturnContent(await this.seat_Service.seat_Remove(+id));
  }
}
